﻿using UnityEngine;
using TMPro;

public class FailPanel : UIBoxBase
{
    public TextMeshProUGUI CurrentScore;
    public TextMeshProUGUI BestScore;

    public override void ShowBox()
    {
        CurrentScore.text = GameManager.instance.CurrentData.CurrentScore.ToString();
        BestScore.text = GameManager.instance.CurrentData.BestScore.ToString();

        base.ShowBox();

        AudioController.Play("TimeOut");
    }

    public void OnPlayButtonClick()
    {
        AudioController.Play("PanelClose");
        HideBox();
        GameManager.instance.RestartGame();
        //AdsManager.instance.PlayInterstitialAds();
    }
}
